import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
import Components from 'unplugin-vue-components/vite'

export default function createComponents() {
  return Components({
    // 指定组件位置，默认是src/components
    dirs: ['src/components'],
    // 配置文件生成位置
    dts: false,
    // 配置文件生成位置
    include: [/\.vue$/, /\.vue\?vue/, /\.tsx$/],
    resolvers: [ElementPlusResolver()],
  })
}
